package com.ruoyi.basebill.service;

import java.util.HashMap;
import java.util.List;

import com.ruoyi.basebill.domain.BomCostcalc;
import com.ruoyi.basebill.domain.BomCostcalcNewDomain;
import com.ruoyi.basebill.domain.BomCostcalcentry;

/**
 * BOM成本测算Service接口
 *
 * @author ruoyi
 * @date 2024-09-06
 */
public interface IBomCostcalcService {
    /**
     * 查询BOM成本测算
     *
     * @param fid BOM成本测算主键
     * @return BOM成本测算
     */
    public BomCostcalc selectTBomCostcalcByFid(String fid);

    /**
     * 查询BOM成本测算列表
     *
     * @param bomCostcalc BOM成本测算
     * @return BOM成本测算集合
     */
    public List<BomCostcalc> selectTBomCostcalcList(BomCostcalc bomCostcalc,boolean ispage);
    public List<BomCostcalcNewDomain> selectBomCostcalcList3(BomCostcalc bomCostcalc);

    /**
     * 根据测算需求单的ID来
     */
    public List<BomCostcalc> selectBomCostcalcListByCalcDemandfids(String[] fid);

    public BomCostcalc selectBomCostcalcByCalcDemandfid(String fid);

    /**
     * 新增BOM成本测算
     *
     * @param bomCostcalc BOM成本测算
     * @return 结果
     */
    public int insertTBomCostcalc(BomCostcalc bomCostcalc);

    public int batchBomCostcalc(List<BomCostcalc> bomCostcalcList);

    /**
     * 修改BOM成本测算
     *
     * @param bomCostcalc BOM成本测算
     * @return 结果
     */
    public int updateTBomCostcalc(BomCostcalc bomCostcalc);

    /**
     * 根据正式Bom的数据查询系数
     *
     * @param bomCostcalc BOM成本测算
     * @return 结果
     */
    public HashMap getBomCoffe(BomCostcalc bomCostcalc);
    public List<BomCostcalcentry> getRawMaterialEntries(List<BomCostcalcentry> bomCostcalc);
    public List<BomCostcalcentry> getCostEntries(List<BomCostcalcentry> bomCostcalc);

    /**
     * 根据正式Bom的数据查询系数
     *
     * @param fids 需要删除的BOM成本测算主键集合
     * @return 结果
     */
    public int deleteTBomCostcalcByFids(String[] fids);

    /**
     * 删除BOM成本测算信息
     *
     * @param fid BOM成本测算主键
     * @return 结果
     */
    public int deleteTBomCostcalcByFid(String fid);

    public HashMap getMaterialBomAllNodes(String id,String longCode1);

    public HashMap optionStatus(String[] ids, String status);
    public void moveProdect(String id, boolean isMove);
    public void reverse(String[] ids);

    /**
     * 查询成本测算分录
     *
     * @param fid 成本测算分录主键
     * @return 成本测算分录
     */
    public BomCostcalcentry selectBomCostcalcentryByFid(String fid);
    public BomCostcalcentry removeEntry(BomCostcalcentry entry,boolean isClearMaterial,boolean isClearPrice,boolean isClearCategory);
}
